package com.sky.mapper;

import com.sky.entity.User;
import com.sky.vo.UserLoginVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {
    @Select("select * from user where id=#{id}")
    UserLoginVO login(User user);

    @Select("select * from user where openid=#{openid}")
    User findByOpenid(String openid);

    @Select("select * from user where id=#{id}")
    User getById(Long id);


    void add(User u);

    @Select("SELECT count(*) from user where create_time between #{begintime} and #{endtime}")
    Integer newUserList(Map map);


}
